package com.vcourse.cloud.oss.api.feign;

import com.vcourse.cloud.oss.api.feign.fallback.OssServiceFallBack;
import com.vcourse.commons.result.R;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author Zengsh123
 * @date 2020-05-31 14:27
 */
@Service
@FeignClient(value = "cloud-oss", fallback = OssServiceFallBack.class)
public interface OssService {

    @ApiOperation("删除文件")
    @DeleteMapping("/cloud/oss/deleteFiles")
    R deleteFiles(@ApiParam("OSS文件包含文件后缀在内的完整路径")
                             @RequestBody List<String> files);
}
